#pragma once

class RapiStreamHolder
{
    public:
        RapiStreamHolder();
        ~RapiStreamHolder();
        IRAPIStream *Stream();
        HRESULT Invoke(const std::wstring &pathToDll,
                       const std::wstring &funcName,
                       const std::wstring &input,
                       BYTE *output,
                       DWORD outputSize);
        HRESULT SetReadTimeout(DWORD timeout);
    private:
        IRAPIStream *m_RapiStream;
};

class RegKeyHolder
{
public:
    ~RegKeyHolder();
    HRESULT OpenKey(HKEY preDefKey, const std::wstring &subKey);
    HRESULT GetKeyValue(const std::wstring &valueName,
                        BYTE *valueBuffer,
                        DWORD valueSize);
private:
    HKEY m_Key;
};

class CeFindHolder 
{
public:
    ~CeFindHolder();
    HRESULT FirstFile(const std::wstring &path, CE_FIND_DATA &fileSystemItem);
private:
    HANDLE m_FileHandle;
};